package net.edwardstx.hibernateutils.configurators;

import org.hibernate.cfg.AnnotationConfiguration;

import net.edwardstx.hibernateutils.HibernateConfigurator;

public class DebugAdaptor implements HibernateConfigurator {

	private HibernateConfigurator configurator;
	public DebugAdaptor(HibernateConfigurator configuratorNew){
		configurator = configuratorNew;
	}
	@Override
	public AnnotationConfiguration configure(AnnotationConfiguration config) {
		AnnotationConfiguration tmp = configurator.configure(config);
		tmp.setProperty("hibernate.show_sql","true");
		tmp.setProperty("hibernate.use_sql_comments","true");
		tmp.setProperty("hibernate.format_sql","true");
		return tmp;
	}

}
